package android.slc.appdb.sys.entity;

import android.slc.db.entity.IDbBase;
import android.slc.db.entity.IDbEntity;

import io.objectbox.annotation.Entity;
import io.objectbox.annotation.Id;
import io.objectbox.annotation.Index;
import io.objectbox.annotation.Transient;

@Entity
public class CsDictType implements IDbEntity<Long>, IDbBase {

    /**
     * 字典主键
     */
    @Id
    private Long dictId;

    /**
     * 字典名称
     */
    private String dictName;

    /**
     * 字典类型
     */
    @Index
    private String dictType;

    /**
     * 禁用修改类型
     */
    private int editDictTypeStatus;
    /**
     * 排序
     */
    private int sort;

    /**
     * 拓展字符串
     */
    private String dbExpandText;

    /**
     * 拓展
     */
    @Transient
    private DbExpand dbExpand;

    public Long getDictId() {
        return dictId;
    }

    public void setDictId(Long dictId) {
        this.dictId = dictId;
    }

    public String getDictName() {
        return dictName;
    }

    public void setDictName(String dictName) {
        this.dictName = dictName;
    }

    public String getDictType() {
        return dictType;
    }

    public void setDictType(String dictType) {
        this.dictType = dictType;
    }

    public int getEditDictTypeStatus() {
        return editDictTypeStatus;
    }

    public void setEditDictTypeStatus(int editDictTypeStatus) {
        this.editDictTypeStatus = editDictTypeStatus;
    }

    public int getSort() {
        return sort;
    }

    public void setSort(int sort) {
        this.sort = sort;
    }

    public String getDbExpandText() {
        return dbExpandText;
    }

    public void setDbExpandText(String dbExpandText) {
        this.dbExpandText = dbExpandText;
    }

    public void setDbExpand(DbExpand dbExpand) {
        this.dbExpand = dbExpand;
    }

    public DbExpand getDbExpand() {
        return dbExpand;
    }

    public DbExpand getDbExpandNotNull() {
        if(getDbExpand()==null){
            setDbExpand(new DbExpand());
        }
        return getDbExpand();
    }

    @Override
    public void setEId(Long eId) {
        setDictId(eId);
    }

    @Override
    public Long getEId() {
        return getDictId();
    }

    /**
     * 创建者
     */
    private Long _createBy;

    /**
     * 创建时间
     */
    private Long _createTime;

    /**
     * 更新者
     */
    private Long _updateBy;

    /**
     * 更新时间
     */
    private Long _updateTime;

    /**
     * 状态
     */
    private int _status;
    /**
     * 备注
     */
    private String _remark;

    /**
     * 状态名称
     */
    @Transient
    private String statusName;

    @Override
    public Long get_createBy() {
        return _createBy;
    }

    @Override
    public void set_createBy(Long createBy) {
        this._createBy = createBy;
    }

    @Override
    public Long get_createTime() {
        return _createTime;
    }

    public void set_createTime(Long createTime) {
        this._createTime = createTime;
    }

    @Override
    public Long get_updateBy() {
        return _updateBy;
    }

    @Override
    public void set_updateBy(Long updateBy) {
        this._updateBy = updateBy;
    }

    @Override
    public Long get_updateTime() {
        return _updateTime;
    }

    @Override
    public void set_updateTime(Long updateTime) {
        this._updateTime = updateTime;
    }

    @Override
    public int get_status() {
        return _status;
    }

    @Override
    public void set_status(int status) {
        this._status = status;
    }

    @Override
    public String get_remark() {
        return _remark;
    }

    @Override
    public void set_remark(String remark) {
        this._remark = remark;
    }

    public String getStatusName() {
        return statusName;
    }

    public void setStatusName(String statusName) {
        this.statusName = statusName;
    }
}
